Hello,
is there any way to change (dynamically) the (values of a) list in a multilist?
More specific: I want to display a list with a fixed size and depending on some other GUI action the displayed values of the multilist should change.
To my mind, the "set" function for a multilist seem only to set the selection, right?
If a multilist doesn't allow this: Is there another GUI element which provides this functionality?
Thanks
SystemAdmin - Thu Sep 22 15:29:10 EDT 2011 |
Re: Modify multilist llandale - Thu Sep 22 16:55:59 EDT 2011
You need to modify the enumerations of the underlying attribute type. There are few threads here about that. Its tricky since you need to create arrays parellel to each other, one indexing the values of the old array. If your old ones are 1,2,3,4 and you change to 1,5,2,3, you will need to decide mapping or else objects with a removed value will lost that value.
I'm guessing ... I suspect you are wanting different available values for different objects; cannot do that.
I wonder if you should instead have some target string attribute but use some GUI to offer fixed value options to the user.
|
Re: Modify multilist SystemAdmin - Thu Sep 22 17:24:45 EDT 2011 llandale - Thu Sep 22 16:55:59 EDT 2011
You need to modify the enumerations of the underlying attribute type. There are few threads here about that. Its tricky since you need to create arrays parellel to each other, one indexing the values of the old array. If your old ones are 1,2,3,4 and you change to 1,5,2,3, you will need to decide mapping or else objects with a removed value will lost that value.
I'm guessing ... I suspect you are wanting different available values for different objects; cannot do that.
I wonder if you should instead have some target string attribute but use some GUI to offer fixed value options to the user.
No, that is not what I want. The displayed values do not belong to any attribute.
My problem is something like that (hope I get the syntax right, as I am at home and my doors installation is in my office, so...)
string myList[3] = {"a","b","c"}
string myList2[3] = {"x","y","z"}
DBE list = multlist(myDB, "myLabel", 3, myList)
[...] // display GUI and do something in the GUI
// later on
set(list, myList2) // doesn't work, as "set" is just overloaded to set the selected item.
Background: I try to create an interactive user group selection GUI.
What I have already:
-
field dbe (search string)
-
text dbe (displays the first 5 matches of the current search string)
Whenever one user edits the text in the field the text dbe is updated (using a pseudo callback with a timer dbe).
My code already works with the text dbe above - but no one can choose any specific entry in the text dbe. So I want to replace it by a multilist or something like that. And as my search function which gives me the first 5 matches returns an array, it would be suffice if I can just "exchange" the list of this multilist.
Example with 3 entries
field "A"
==>
list AAA, AAB, ABC (not displayed for example "ABA, ABB")
field "AB"
==>
list ABA, ABB, ABC
Hope my goal is clarified now.
Thanks in advance.
|
Re: Modify multilist llandale - Thu Sep 22 18:10:04 EDT 2011 SystemAdmin - Thu Sep 22 17:24:45 EDT 2011
No, that is not what I want. The displayed values do not belong to any attribute.
My problem is something like that (hope I get the syntax right, as I am at home and my doors installation is in my office, so...)
string myList[3] = {"a","b","c"}
string myList2[3] = {"x","y","z"}
DBE list = multlist(myDB, "myLabel", 3, myList)
[...] // display GUI and do something in the GUI
// later on
set(list, myList2) // doesn't work, as "set" is just overloaded to set the selected item.
Background: I try to create an interactive user group selection GUI.
What I have already:
-
field dbe (search string)
-
text dbe (displays the first 5 matches of the current search string)
Whenever one user edits the text in the field the text dbe is updated (using a pseudo callback with a timer dbe).
My code already works with the text dbe above - but no one can choose any specific entry in the text dbe. So I want to replace it by a multilist or something like that. And as my search function which gives me the first 5 matches returns an array, it would be suffice if I can just "exchange" the list of this multilist.
Example with 3 entries
field "A"
==>
list AAA, AAB, ABC (not displayed for example "ABA, ABB")
field "AB"
==>
list ABA, ABB, ABC
Hope my goal is clarified now.
Thanks in advance.
Sorry, completely mis-read your post. Will take a peak tomorrow.
|
Re: Modify multilist strathglass - Thu Jun 01 20:14:51 EDT 2017
I was looking to solve the same issue: change a multiList DBE to show a different list of values (with a different size even).
Is it possible? If so how, and if not what is the best approach to deal with this?
|
Re: Modify multilist Mathias Mamsch - Fri Jun 02 05:10:58 EDT 2017 strathglass - Thu Jun 01 20:14:51 EDT 2017
I was looking to solve the same issue: change a multiList DBE to show a different list of values (with a different size even).
Is it possible? If so how, and if not what is the best approach to deal with this?
You can empty and reinsert elements in the list (one by one). Regards, Mathias
|